package day06.text01;

import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import java.io.File;
import java.util.List;

public class WeChat {
    public static void main(String[] args) throws DocumentException {
        SAXReader saxReader = new SAXReader();
        Document document = saxReader.read(new File("D:\\Java\\group5InClass27\\src\\day06\\return.xml"));
        Element rootElement = document.getRootElement();
        List<Element> trade_type = rootElement.elements("trade_type");
        Element prepay_id = rootElement.element("prepay_id");
        String text1 = prepay_id.getText();
        System.out.println(text1);

        System.out.println(trade_type.size());
        for (Element e : trade_type) {
            String text = e.getText();
            System.out.println(text);
        }


    }
}
